<div class="panel panel-default panel-intro">
    
    <div class="panel-heading">
        {:build_heading(null,FALSE)}
        <ul class="nav nav-tabs" data-field="state">
            <li class="{:$Think.get.state === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
            {foreach name="stateList" item="vo"}
            <li class="{:$Think.get.state === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
            {/foreach}
        </ul>
    </div>


    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('express/batch/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
                        <!--<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('express/batch/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
                        <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('express/batch/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
                        <a href="javascript:;" class="btn btn-warning btn-setState btn-disabled disabled {:$auth->check('express/batch/setState')?'':'hide'}" title="{:__('改变状态')}" ><i class="fa fa-cog"></i> {:__('改变状态')}</a>
                        
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit="{:$auth->check('express/batch/edit')}" 
                           data-operate-del="{:$auth->check('express/batch/del')}" 
                           width="100%">
                    </table>
                </div>
            </div>

        </div>
    </div>
</div>

<script type="text/html" id="setBatchTpl">
    <form id="setState-form" class="form-horizontal form-layer" method="POST" action="{:url('express/batch/setState')}">
        <div class="form-body">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-3">设置状态:</label>
                <div class="col-xs-12 col-sm-8">
                    <select class="form-control" name="row[state]" id="setState">
                        {volist name="stateList" id="state"}
                        <option value="{$key}">{$state}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-3">备注:</label>
                <div class="col-xs-12 col-sm-8">
                    <input type="text" class="form-control" name="row[memo]" placeholder="该备注只会显示在后台物流轨迹内">
                </div>
            </div>
            <input type="hidden" id="c-ids" name="row[ids]" value="">
        </div>
        <div class="form-footer">
            <div class="form-group" style="margin-bottom:0;">
                <label class="control-label col-xs-12 col-sm-3"></label>
                <div class="col-xs-12 col-sm-8">
                    <button type="submit" class="btn btn-md btn-info">提交</button>
                </div>
            </div>
        </div>
    </form>
</script>
